Package org.tmatesoft.svn.core
Class SVNProperty
- java.lang.Object
-
- org.tmatesoft.svn.core.SVNProperty
-
public class SVNProperty extends java.lang.ObjectThe SVNProperty class is a representation class for both versioned properties (user-managed svn specials) and for metaproperties (untweakable) supported by Subversion. This class holds string constants that are property names, and gives some useful methods to operate with properties (in particular).- Since:
- 1.2
- Version:
- 1.3
- Author:
- TMate Software Ltd.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringABSENTAn "svn:entry:absent" SVN untweakable metaproperty.static java.lang.StringACTIVITY_URLAn "svn:wc:ra_dav:activity-url" SVN untweakable metaproperty.static SVNPropertyValueBOOLEAN_PROPERTY_VALUEstatic java.lang.StringCACHABLE_PROPS"cachable-props" SVN untweakable metaproperty.static java.lang.StringCHANGELISTAn "svn:entry:changelist" SVN untweakable metaproperty.static java.lang.StringCHARSETSVNKitspecific property denoting a charset.static java.lang.StringCHECKSUMAn "svn:entry:checksum" SVN untweakable metaproperty.static java.lang.StringCOMMITTED_DATEAn "svn:entry:committed-date" SVN untweakable metaproperty.static java.lang.StringCOMMITTED_REVISIONAn "svn:entry:committed-rev" SVN untweakable metaproperty.static java.lang.StringCONFLICT_NEWAn "svn:entry:conflict-new" SVN untweakable metaproperty.static java.lang.StringCONFLICT_OLDAn "svn:entry:conflict-old" SVN untweakable metaproperty.static java.lang.StringCONFLICT_WRKAn "svn:entry:conflict-wrk" SVN untweakable metaproperty.static java.lang.StringCOPIEDAn "svn:entry:copied" SVN untweakable metaproperty.static java.lang.StringCOPYFROM_REVISIONAn "svn:entry:copyfrom-rev" SVN untweakable metaproperty.static java.lang.StringCOPYFROM_URLAn "svn:entry:copyfrom-url" SVN untweakable metaproperty.static java.lang.StringCORRUPTEDAn "svn:entry:corrupted" SVN untweakable metaproperty.static java.lang.StringDELETEDAn "svn:entry:deleted" SVN untweakable metaproperty.static java.lang.StringDEPTHAn "svn:entry:depth" SVN untweakable metaproperty.static byte[]EOL_CR_BYTESCR (carriage return) EOL (end of line) byte array.static byte[]EOL_CRLF_BYTESCR (carriage return) and LF (line feed) EOL (end of line) bytes array.static byte[]EOL_LF_BYTESLF (line feed) EOL (end of line) byte array.static java.lang.StringEOL_STYLEAn "svn:eol-style" SVN special property.static java.lang.StringEOL_STYLE_CROne of the four possible values of theEOL_STYLEproperty - "CR" (linefeed)static java.lang.StringEOL_STYLE_CRLFOne of the four possible values of theEOL_STYLEproperty - "CRLF"static java.lang.StringEOL_STYLE_LFOne of the four possible values of theEOL_STYLEproperty - "LF" (line feed)static java.lang.StringEOL_STYLE_NATIVEOne of the four possible values of theEOL_STYLEproperty - "native"static java.lang.StringEXECUTABLEAn "svn:executable" SVN special property.static java.lang.StringEXTERNALSAn "svn:externals" SVN special property.static java.lang.StringFILE_EXTERNAL_PATHstatic java.lang.StringFILE_EXTERNAL_PEG_REVISIONstatic java.lang.StringFILE_EXTERNAL_REVISIONstatic java.lang.StringHAS_PROP_MODS"has-prop-mods" SVN untweakable metaproperty.static java.lang.StringHAS_PROPS"has-props" SVN untweakable metaproperty.static java.lang.StringIGNOREAn "svn:ignore" SVN special property.static java.lang.StringINCOMPLETEAn "svn:entry:incomplete" SVN untweakable metaproperty.static java.lang.StringINHERITABLE_AUTO_PROPSstatic java.lang.StringINHERITABLE_IGNORESstatic java.lang.StringKEEP_LOCALAn "svn:entry:keep-local" SVN untweakable metaproperty.static java.lang.StringKEYWORDSAn "svn:keywords" SVN special property.static java.lang.StringKINDAn "svn:entry:kind" SVN untweakable metaproperty.static java.lang.StringKIND_DIROne of the two possible values of theKINDproperty - "dir"static java.lang.StringKIND_FILEOne of the two possible values of theKINDproperty - "file"static java.lang.StringLAST_AUTHORAn "svn:entry:last-author" SVN untweakable metaproperty.static java.lang.StringLOCK_COMMENTAn "svn:entry:lock-comment" SVN untweakable metaproperty.static java.lang.StringLOCK_CREATION_DATEAn "svn:entry:lock-creation-date" SVN untweakable metaproperty.static java.lang.StringLOCK_OWNERAn "svn:entry:lock-owner" SVN untweakable metaproperty.static java.lang.StringLOCK_TOKENAn "svn:entry:lock-token" SVN untweakable metaproperty.static java.lang.StringMERGE_INFOstatic java.lang.StringMIME_TYPEAn "svn:mime-type" SVN special property.static java.lang.StringNAMEAn "svn:entry:name" SVN untweakable metaproperty.static java.lang.StringNATIVEDefault value for theCHARSETproperty denoting that the native charset should be used to encode a file during translation.static java.lang.StringNEEDS_LOCKAn "svn:needs-lock" SVN special property.static java.lang.StringPRESENT_PROPS"present-props" SVN untweakable metaproperty.static java.lang.StringPROP_REJECT_FILEAn "svn:entry:prop-reject-file" SVN untweakable metaproperty.static java.lang.StringPROP_TIMEAn "svn:entry:prop-time" SVN untweakable metaproperty.static java.lang.StringREPOSAn "svn:entry:repos" SVN untweakable metaproperty.static java.lang.StringREVISIONAn "svn:entry:revision" SVN untweakable metaproperty.static java.lang.StringSCHEDULEAn "svn:entry:schedule" SVN untweakable metaproperty.static java.lang.StringSCHEDULE_ADDOne of the three possible values of theSCHEDULEproperty - "add"static java.lang.StringSCHEDULE_DELETEOne of the three possible values of theSCHEDULEproperty - "delete"static java.lang.StringSCHEDULE_REPLACEOne of the three possible values of theSCHEDULEproperty - "replace"static java.lang.StringSPECIALAn "svn:special" SVN special property.static java.lang.StringSVN_ENTRY_PREFIXAn "svn:entry:" prefix.static java.lang.StringSVN_PREFIXAn "svn:" prefix.static java.lang.StringSVN_SYNC_PREFIXThe namespace for revision properties which are used in repository synching operations.static java.lang.StringSVN_WC_PREFIXAn "svn:wc:" prefix.static java.lang.StringSVNKIT_ENTRY_PREFIXAn "svnkit:entry:" prefix.static java.lang.StringSVNKIT_PREFIXSVNKit's own property namespace.static java.lang.StringSVNKIT_SHA1_CHECKSUMAn "svnkit:entry:sha1-checksum" SVNKit untweakable metaproperty.static java.lang.StringTEXT_TIMEAn "svn:entry:text-time" SVN untweakable metaproperty.static java.lang.StringTREE_CONFLICT_DATAstatic java.lang.StringTXN_CHECK_LOCKSA special property used in a commit transaction.static java.lang.StringTXN_CHECK_OUT_OF_DATENESSA special property used in a commit transaction.static java.lang.StringURLAn "svn:entry:url" SVN untweakable metaproperty.static java.lang.StringUUIDAn "svn:entry:uuid" SVN untweakable metaproperty.static java.lang.StringWC_URLAn "svn:wc:ra_dav:version-url" SVN untweakable metaproperty.static java.lang.StringWORKING_SIZEAn "svn:entry:working-size" SVN untweakable metaproperty.static longWORKING_SIZE_UNKNOWNDefault value of theWORKING_SIZEproperty.
-
Constructor Summary
Constructors Constructor Description SVNProperty()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddTextMimeType(java.lang.String textMimeType)Adds custom mime-type value that should be considered as text.static booleanbooleanValue(java.lang.String text)Converts a string representation of a boolean value to boolean.static voidclearTextMimeTypes()Clears custom mime-types previously added.java.util.SetgetTextMimeTypes()Returns custom mime-types previously added.static SVNPropertyValuegetValueOfBooleanProperty(java.lang.String propName)Returns the value for such boolean properties as "svn:executable", "svn:needs-lock" and "svn:special".static booleanisBinaryMimeType(java.lang.String mimeType)Says if the given MIME-type corresponds to a binary (non-textual) type.static booleanisBooleanProperty(java.lang.String propName)Checks whether the property is boolean.static booleanisEntryProperty(java.lang.String name)Says if the given property name starts with theSVN_ENTRY_PREFIXprefix.static booleanisRegularProperty(java.lang.String name)Checks if a property is regular.static booleanisSVNKitProperty(java.lang.String name)Says if the given property name starts with theSVNKIT_PREFIX.static booleanisSVNProperty(java.lang.String name)Says if the given property name starts with theSVN_PREFIXprefix or with theSVNKIT_PREFIX.static booleanisTextMimeType(java.lang.String mimeType)Says if the given MIME-type corresponds to a text type.static booleanisUTF8(java.lang.String charset)Says if the given charset is the name of UTF-8 encoding.static booleanisWorkingCopyProperty(java.lang.String name)Says if the given property name starts with theSVN_WC_PREFIXprefix.static longlongValue(java.lang.String text)Converts a string representation of a numeric value to a long value.static booleanmimeTypeIsBinary(java.lang.String mimeType)static java.lang.StringshortPropertyName(java.lang.String longName)Returns a short name for the given property name - that is a name without any prefixes.static java.lang.StringtoString(boolean b)Converts a boolean value to a string representation.static java.lang.StringtoString(long i)Converts a long value to a string representation.
-
-
-
Field Detail
-
SVN_PREFIX
public static final java.lang.String SVN_PREFIX
An "svn:" prefix.- See Also:
- Constant Field Values
-
SVNKIT_PREFIX
public static final java.lang.String SVNKIT_PREFIX
SVNKit's own property namespace.- See Also:
- Constant Field Values
-
SVN_WC_PREFIX
public static final java.lang.String SVN_WC_PREFIX
An "svn:wc:" prefix.- See Also:
- Constant Field Values
-
SVN_SYNC_PREFIX
public static final java.lang.String SVN_SYNC_PREFIX
The namespace for revision properties which are used in repository synching operations.- See Also:
- Constant Field Values
-
TXN_CHECK_LOCKS
public static final java.lang.String TXN_CHECK_LOCKS
A special property used in a commit transaction.- See Also:
- Constant Field Values
-
TXN_CHECK_OUT_OF_DATENESS
public static final java.lang.String TXN_CHECK_OUT_OF_DATENESS
A special property used in a commit transaction.- See Also:
- Constant Field Values
-
SVN_ENTRY_PREFIX
public static final java.lang.String SVN_ENTRY_PREFIX
An "svn:entry:" prefix.- See Also:
- Constant Field Values
-
SVNKIT_ENTRY_PREFIX
public static final java.lang.String SVNKIT_ENTRY_PREFIX
An "svnkit:entry:" prefix.- See Also:
- Constant Field Values
-
EOL_STYLE
public static final java.lang.String EOL_STYLE
An "svn:eol-style" SVN special property.- See Also:
- Constant Field Values
-
IGNORE
public static final java.lang.String IGNORE
An "svn:ignore" SVN special property.- See Also:
- Constant Field Values
-
MIME_TYPE
public static final java.lang.String MIME_TYPE
An "svn:mime-type" SVN special property.- See Also:
- Constant Field Values
-
KEYWORDS
public static final java.lang.String KEYWORDS
An "svn:keywords" SVN special property.- See Also:
- Constant Field Values
-
EXECUTABLE
public static final java.lang.String EXECUTABLE
An "svn:executable" SVN special property.- See Also:
- Constant Field Values
-
EXTERNALS
public static final java.lang.String EXTERNALS
An "svn:externals" SVN special property.- See Also:
- Constant Field Values
-
SPECIAL
public static final java.lang.String SPECIAL
An "svn:special" SVN special property.- See Also:
- Constant Field Values
-
MERGE_INFO
public static final java.lang.String MERGE_INFO
- Since:
- SVN 1.5
- See Also:
- Constant Field Values
-
INHERITABLE_IGNORES
public static final java.lang.String INHERITABLE_IGNORES
- Since:
- SVN 1.8
- See Also:
- Constant Field Values
-
INHERITABLE_AUTO_PROPS
public static final java.lang.String INHERITABLE_AUTO_PROPS
- Since:
- SVN 1.8
- See Also:
- Constant Field Values
-
REVISION
public static final java.lang.String REVISION
An "svn:entry:revision" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
COMMITTED_REVISION
public static final java.lang.String COMMITTED_REVISION
An "svn:entry:committed-rev" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
COMMITTED_DATE
public static final java.lang.String COMMITTED_DATE
An "svn:entry:committed-date" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
HAS_PROPS
public static final java.lang.String HAS_PROPS
"has-props" SVN untweakable metaproperty.- Since:
- 1.1, new in Subversion 1.4
- See Also:
- Constant Field Values
-
HAS_PROP_MODS
public static final java.lang.String HAS_PROP_MODS
"has-prop-mods" SVN untweakable metaproperty.- Since:
- 1.1, new in Subversion 1.4
- See Also:
- Constant Field Values
-
CACHABLE_PROPS
public static final java.lang.String CACHABLE_PROPS
"cachable-props" SVN untweakable metaproperty.- Since:
- 1.1, new in Subversion 1.4
- See Also:
- Constant Field Values
-
PRESENT_PROPS
public static final java.lang.String PRESENT_PROPS
"present-props" SVN untweakable metaproperty.- Since:
- 1.1, new in Subversion 1.4
- See Also:
- Constant Field Values
-
KEEP_LOCAL
public static final java.lang.String KEEP_LOCAL
An "svn:entry:keep-local" SVN untweakable metaproperty.- Since:
- 1.2.0, new in Subversion 1.5.0
- See Also:
- Constant Field Values
-
CHANGELIST
public static final java.lang.String CHANGELIST
An "svn:entry:changelist" SVN untweakable metaproperty.- Since:
- 1.2.0, new in Subversion 1.5.0
- See Also:
- Constant Field Values
-
WORKING_SIZE
public static final java.lang.String WORKING_SIZE
An "svn:entry:working-size" SVN untweakable metaproperty.- Since:
- 1.2.0, new in Subversion 1.5.0
- See Also:
- Constant Field Values
-
DEPTH
public static final java.lang.String DEPTH
An "svn:entry:depth" SVN untweakable metaproperty.- Since:
- 1.2.0, new in Subversion 1.5.0
- See Also:
- Constant Field Values
-
FILE_EXTERNAL_PATH
public static final java.lang.String FILE_EXTERNAL_PATH
- Since:
- 1.3, new in Subversion 1.6
- See Also:
- Constant Field Values
-
FILE_EXTERNAL_REVISION
public static final java.lang.String FILE_EXTERNAL_REVISION
- Since:
- 1.3, new in Subversion 1.6
- See Also:
- Constant Field Values
-
FILE_EXTERNAL_PEG_REVISION
public static final java.lang.String FILE_EXTERNAL_PEG_REVISION
- Since:
- 1.3, new in Subversion 1.6
- See Also:
- Constant Field Values
-
TREE_CONFLICT_DATA
public static final java.lang.String TREE_CONFLICT_DATA
- Since:
- 1.3, new in Subversion 1.6
- See Also:
- Constant Field Values
-
CHECKSUM
public static final java.lang.String CHECKSUM
An "svn:entry:checksum" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
SVNKIT_SHA1_CHECKSUM
public static final java.lang.String SVNKIT_SHA1_CHECKSUM
An "svnkit:entry:sha1-checksum" SVNKit untweakable metaproperty.- See Also:
- Constant Field Values
-
URL
public static final java.lang.String URL
An "svn:entry:url" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
COPYFROM_URL
public static final java.lang.String COPYFROM_URL
An "svn:entry:copyfrom-url" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
COPYFROM_REVISION
public static final java.lang.String COPYFROM_REVISION
An "svn:entry:copyfrom-rev" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
SCHEDULE
public static final java.lang.String SCHEDULE
An "svn:entry:schedule" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
COPIED
public static final java.lang.String COPIED
An "svn:entry:copied" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
LAST_AUTHOR
public static final java.lang.String LAST_AUTHOR
An "svn:entry:last-author" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
UUID
public static final java.lang.String UUID
An "svn:entry:uuid" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
REPOS
public static final java.lang.String REPOS
An "svn:entry:repos" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
PROP_TIME
public static final java.lang.String PROP_TIME
An "svn:entry:prop-time" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
TEXT_TIME
public static final java.lang.String TEXT_TIME
An "svn:entry:text-time" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
An "svn:entry:name" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
KIND
public static final java.lang.String KIND
An "svn:entry:kind" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
CONFLICT_OLD
public static final java.lang.String CONFLICT_OLD
An "svn:entry:conflict-old" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
CONFLICT_NEW
public static final java.lang.String CONFLICT_NEW
An "svn:entry:conflict-new" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
CONFLICT_WRK
public static final java.lang.String CONFLICT_WRK
An "svn:entry:conflict-wrk" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
PROP_REJECT_FILE
public static final java.lang.String PROP_REJECT_FILE
An "svn:entry:prop-reject-file" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
DELETED
public static final java.lang.String DELETED
An "svn:entry:deleted" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
ABSENT
public static final java.lang.String ABSENT
An "svn:entry:absent" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
INCOMPLETE
public static final java.lang.String INCOMPLETE
An "svn:entry:incomplete" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
CORRUPTED
public static final java.lang.String CORRUPTED
An "svn:entry:corrupted" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
WC_URL
public static final java.lang.String WC_URL
An "svn:wc:ra_dav:version-url" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
ACTIVITY_URL
public static final java.lang.String ACTIVITY_URL
An "svn:wc:ra_dav:activity-url" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
LOCK_TOKEN
public static final java.lang.String LOCK_TOKEN
An "svn:entry:lock-token" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
LOCK_COMMENT
public static final java.lang.String LOCK_COMMENT
An "svn:entry:lock-comment" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
LOCK_OWNER
public static final java.lang.String LOCK_OWNER
An "svn:entry:lock-owner" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
LOCK_CREATION_DATE
public static final java.lang.String LOCK_CREATION_DATE
An "svn:entry:lock-creation-date" SVN untweakable metaproperty.- See Also:
- Constant Field Values
-
NEEDS_LOCK
public static final java.lang.String NEEDS_LOCK
An "svn:needs-lock" SVN special property.- See Also:
- Constant Field Values
-
KIND_DIR
public static final java.lang.String KIND_DIR
One of the two possible values of theKINDproperty - "dir"- See Also:
- Constant Field Values
-
KIND_FILE
public static final java.lang.String KIND_FILE
One of the two possible values of theKINDproperty - "file"- See Also:
- Constant Field Values
-
EOL_STYLE_LF
public static final java.lang.String EOL_STYLE_LF
One of the four possible values of theEOL_STYLEproperty - "LF" (line feed)- See Also:
- Constant Field Values
-
EOL_STYLE_CR
public static final java.lang.String EOL_STYLE_CR
One of the four possible values of theEOL_STYLEproperty - "CR" (linefeed)- See Also:
- Constant Field Values
-
EOL_STYLE_CRLF
public static final java.lang.String EOL_STYLE_CRLF
One of the four possible values of theEOL_STYLEproperty - "CRLF"- See Also:
- Constant Field Values
-
EOL_STYLE_NATIVE
public static final java.lang.String EOL_STYLE_NATIVE
One of the four possible values of theEOL_STYLEproperty - "native"- See Also:
- Constant Field Values
-
EOL_LF_BYTES
public static final byte[] EOL_LF_BYTES
LF (line feed) EOL (end of line) byte array.
-
EOL_CRLF_BYTES
public static final byte[] EOL_CRLF_BYTES
CR (carriage return) and LF (line feed) EOL (end of line) bytes array.
-
EOL_CR_BYTES
public static final byte[] EOL_CR_BYTES
CR (carriage return) EOL (end of line) byte array.
-
CHARSET
public static final java.lang.String CHARSET
SVNKitspecific property denoting a charset. A user may set this property on files if he would like to fix the charset of the file. Then when checking out, exporting, updating, etc. files with such properties set on them will be translated (encoded) using the charset value of this property. Note that to take advantage of this property a user must utilize a corresponging version of theSVNKitlibrary supporting this property.- See Also:
- Constant Field Values
-
NATIVE
public static final java.lang.String NATIVE
Default value for theCHARSETproperty denoting that the native charset should be used to encode a file during translation. The native charset name will be fetched via a call toISVNOptions.getNativeCharset().- See Also:
- Constant Field Values
-
SCHEDULE_ADD
public static final java.lang.String SCHEDULE_ADD
One of the three possible values of theSCHEDULEproperty - "add"- See Also:
- Constant Field Values
-
SCHEDULE_DELETE
public static final java.lang.String SCHEDULE_DELETE
One of the three possible values of theSCHEDULEproperty - "delete"- See Also:
- Constant Field Values
-
SCHEDULE_REPLACE
public static final java.lang.String SCHEDULE_REPLACE
One of the three possible values of theSCHEDULEproperty - "replace"- See Also:
- Constant Field Values
-
WORKING_SIZE_UNKNOWN
public static final long WORKING_SIZE_UNKNOWN
Default value of theWORKING_SIZEproperty.- Since:
- 1.2.0, new in Subversion 1.5.0
- See Also:
- Constant Field Values
-
BOOLEAN_PROPERTY_VALUE
public static final SVNPropertyValue BOOLEAN_PROPERTY_VALUE
Default value for such properties asEXECUTABLE,NEEDS_LOCK,SPECIAL. Used only bySVNKitinternals, never stored in a working copy.- Since:
- 1.2.0
-
-
Method Detail
-
isWorkingCopyProperty
public static boolean isWorkingCopyProperty(java.lang.String name)
Says if the given property name starts with theSVN_WC_PREFIXprefix.- Parameters:
name- a property name to check- Returns:
- true if
nameis not null and starts with theSVN_WC_PREFIXprefix, otherwise false
-
isEntryProperty
public static boolean isEntryProperty(java.lang.String name)
Says if the given property name starts with theSVN_ENTRY_PREFIXprefix.- Parameters:
name- a property name to check- Returns:
- true if
nameis not null and starts with theSVN_ENTRY_PREFIXprefix, otherwise false
-
isSVNProperty
public static boolean isSVNProperty(java.lang.String name)
Says if the given property name starts with theSVN_PREFIXprefix or with theSVNKIT_PREFIX.- Parameters:
name- a property name to check- Returns:
- true if
nameis not null and starts with theSVN_PREFIXprefix or with theSVNKIT_PREFIXprefix, otherwise false
-
isSVNKitProperty
public static boolean isSVNKitProperty(java.lang.String name)
Says if the given property name starts with theSVNKIT_PREFIX.- Parameters:
name- a property name to check- Returns:
- true if
nameis not null and starts with theSVNKIT_PREFIXprefix, otherwise false
-
isRegularProperty
public static boolean isRegularProperty(java.lang.String name)
Checks if a property is regular. A property is considered to be regular if it is not null and does not start neither withSVN_WC_PREFIXnor withSVN_ENTRY_PREFIX.- Parameters:
name- a property name- Returns:
- true if regular, otherwise false
-
isTextMimeType
public static boolean isTextMimeType(java.lang.String mimeType)
Says if the given MIME-type corresponds to a text type.- Parameters:
mimeType- a value of a fileMIME_TYPEproperty- Returns:
- true if
mimeTypeis either null or is a text type (starts with "text/") - See Also:
isBinaryMimeType(String)
-
isBinaryMimeType
public static boolean isBinaryMimeType(java.lang.String mimeType)
Says if the given MIME-type corresponds to a binary (non-textual) type.- Parameters:
mimeType- a value of a fileMIME_TYPEproperty- Returns:
- true if
mimeTypeis not a text type - See Also:
isTextMimeType(String)
-
isUTF8
public static boolean isUTF8(java.lang.String charset)
Says if the given charset is the name of UTF-8 encoding.- Parameters:
charset- a value of a fileCHARSETproperty- Returns:
- true if
charsetis the name of UTF-8 encoding
-
booleanValue
public static boolean booleanValue(java.lang.String text)
Converts a string representation of a boolean value to boolean. Useful to convert values of theCOPIEDproperty.- Parameters:
text- a string to convert to a boolean value- Returns:
- true if and only if
textis not null and is equal, ignoring case, to the string "true"
-
longValue
public static long longValue(java.lang.String text)
Converts a string representation of a numeric value to a long value. Useful to convert revision numbers.- Parameters:
text- a string to convert to a long value- Returns:
- a long representation of the given string; -1 is returned if the string can not be parsed
-
toString
public static java.lang.String toString(boolean b)
Converts a boolean value to a string representation. Useful to convert values of theCOPIEDproperty.- Parameters:
b- a boolean value- Returns:
- a string representation of
b
-
toString
public static java.lang.String toString(long i)
Converts a long value to a string representation. Useful to convert revision numbers.- Parameters:
i- a long value- Returns:
- a string representation of
i
-
shortPropertyName
public static java.lang.String shortPropertyName(java.lang.String longName)
Returns a short name for the given property name - that is a name without any prefixes.- Parameters:
longName- a property name- Returns:
- a property short name
-
getValueOfBooleanProperty
public static SVNPropertyValue getValueOfBooleanProperty(java.lang.String propName)
Returns the value for such boolean properties as "svn:executable", "svn:needs-lock" and "svn:special". Used by internals.- Parameters:
propName- a property name- Returns:
- the property value "*", or null if the property is not boolean
- Since:
- 1.1
- See Also:
isBooleanProperty(String)
-
isBooleanProperty
public static boolean isBooleanProperty(java.lang.String propName)
Checks whether the property is boolean.- Parameters:
propName- a property name- Returns:
- true if boolean, otherwise false
- Since:
- 1.1
-
addTextMimeType
public static void addTextMimeType(java.lang.String textMimeType)
Adds custom mime-type value that should be considered as text. Otherwise only 'null' mime-types and those starting with 'text/' are considered as text.
-
mimeTypeIsBinary
public static boolean mimeTypeIsBinary(java.lang.String mimeType)
-
getTextMimeTypes
public java.util.Set getTextMimeTypes()
Returns custom mime-types previously added.
-
clearTextMimeTypes
public static void clearTextMimeTypes()
Clears custom mime-types previously added.
-
-