Package org.drools.io
Class BaseResource
java.lang.Object
org.drools.io.BaseResource
- All Implemented Interfaces:
Externalizable,Serializable,InternalResource,Resource
- Direct Known Subclasses:
ByteArrayResource,ClassPathResource,DescrResource,FileSystemResource,InputStreamResource,ReaderResource
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCategory(String tag) booleanbyte[]getBytes()Returns the description of the resource.inthashCode()voidvoidsetCategories(String categories) voidsetDescription(String description) setResourceType(ResourceType resourceType) setSourcePath(String path) setTargetPath(String path) toString()voidMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.io.InternalResource
getEncoding, getURL, hasURL, isDirectory, listResourcesMethods inherited from interface org.kie.api.io.Resource
getInputStream, getReader
-
Field Details
-
bytes
protected byte[] bytes
-
-
Constructor Details
-
BaseResource
public BaseResource()
-
-
Method Details
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getConfiguration
- Specified by:
getConfigurationin interfaceInternalResource- Specified by:
getConfigurationin interfaceResource
-
setConfiguration
- Specified by:
setConfigurationin interfaceInternalResource- Specified by:
setConfigurationin interfaceResource
-
setResourceType
- Specified by:
setResourceTypein interfaceInternalResource- Specified by:
setResourceTypein interfaceResource
-
getResourceType
- Specified by:
getResourceTypein interfaceInternalResource- Specified by:
getResourceTypein interfaceResource
-
getDescription
Description copied from interface:InternalResourceReturns the description of the resource. This is just a text description of the resource used to add more information about it. This is not a mandatory attribute- Specified by:
getDescriptionin interfaceInternalResource- Returns:
- the name of the resource, or null if is not set.
-
setDescription
- Specified by:
setDescriptionin interfaceInternalResource
-
getSourcePath
- Specified by:
getSourcePathin interfaceResource
-
getTargetPath
- Specified by:
getTargetPathin interfaceResource
-
setSourcePath
- Specified by:
setSourcePathin interfaceResource
-
setTargetPath
- Specified by:
setTargetPathin interfaceResource
-
getCategories
- Specified by:
getCategoriesin interfaceInternalResource
-
setCategories
- Specified by:
setCategoriesin interfaceInternalResource
-
addCategory
- Specified by:
addCategoryin interfaceInternalResource
-
getBytes
public byte[] getBytes()- Specified by:
getBytesin interfaceInternalResource
-
toString
-
equals
-
hashCode
public int hashCode()
-