Package org.drools.io
Class BaseResource
- java.lang.Object
-
- org.drools.io.BaseResource
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,InternalResource,org.kie.api.io.Resource
- Direct Known Subclasses:
ByteArrayResource,ClassPathResource,DescrResource,FileSystemResource,InputStreamResource,ReaderResource
public abstract class BaseResource extends java.lang.Object implements InternalResource, java.io.Externalizable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]bytes
-
Constructor Summary
Constructors Constructor Description BaseResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCategory(java.lang.String tag)booleanequals(java.lang.Object o)byte[]getBytes()java.util.List<java.lang.String>getCategories()org.kie.api.io.ResourceConfigurationgetConfiguration()java.lang.StringgetDescription()Returns the description of the resource.org.kie.api.io.ResourceTypegetResourceType()java.lang.StringgetSourcePath()java.lang.StringgetTargetPath()inthashCode()voidreadExternal(java.io.ObjectInput in)voidsetCategories(java.lang.String categories)InternalResourcesetConfiguration(org.kie.api.io.ResourceConfiguration conf)voidsetDescription(java.lang.String description)InternalResourcesetResourceType(org.kie.api.io.ResourceType resourceType)InternalResourcesetSourcePath(java.lang.String path)InternalResourcesetTargetPath(java.lang.String path)java.lang.StringtoString()voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.io.InternalResource
getEncoding, getURL, hasURL, isDirectory, listResources
-
-
-
-
Method Detail
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
getConfiguration
public org.kie.api.io.ResourceConfiguration getConfiguration()
- Specified by:
getConfigurationin interfaceInternalResource- Specified by:
getConfigurationin interfaceorg.kie.api.io.Resource
-
setConfiguration
public InternalResource setConfiguration(org.kie.api.io.ResourceConfiguration conf)
- Specified by:
setConfigurationin interfaceInternalResource- Specified by:
setConfigurationin interfaceorg.kie.api.io.Resource
-
setResourceType
public InternalResource setResourceType(org.kie.api.io.ResourceType resourceType)
- Specified by:
setResourceTypein interfaceInternalResource- Specified by:
setResourceTypein interfaceorg.kie.api.io.Resource
-
getResourceType
public org.kie.api.io.ResourceType getResourceType()
- Specified by:
getResourceTypein interfaceInternalResource- Specified by:
getResourceTypein interfaceorg.kie.api.io.Resource
-
getDescription
public java.lang.String 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
public void setDescription(java.lang.String description)
- Specified by:
setDescriptionin interfaceInternalResource
-
getSourcePath
public java.lang.String getSourcePath()
- Specified by:
getSourcePathin interfaceorg.kie.api.io.Resource
-
getTargetPath
public java.lang.String getTargetPath()
- Specified by:
getTargetPathin interfaceorg.kie.api.io.Resource
-
setSourcePath
public InternalResource setSourcePath(java.lang.String path)
- Specified by:
setSourcePathin interfaceorg.kie.api.io.Resource
-
setTargetPath
public InternalResource setTargetPath(java.lang.String path)
- Specified by:
setTargetPathin interfaceorg.kie.api.io.Resource
-
getCategories
public java.util.List<java.lang.String> getCategories()
- Specified by:
getCategoriesin interfaceInternalResource
-
setCategories
public void setCategories(java.lang.String categories)
- Specified by:
setCategoriesin interfaceInternalResource
-
addCategory
public void addCategory(java.lang.String tag)
- Specified by:
addCategoryin interfaceInternalResource
-
getBytes
public byte[] getBytes()
- Specified by:
getBytesin interfaceInternalResource
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-