public class StructureElementFactory extends Object
StructureElement
given a string representing it.
Note:When a new class implementing a StructureElement
is
added, it should be annotated with @JsonTypeName("NEW_TYPE")
that is used to determine the new element. The input String will be in the
form NEW_TYPE##struct_content
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_CONTENT_SEPARATOR |
Modifier and Type | Method and Description |
---|---|
static StructureElementFactory |
getInstance()
Returns an instance of the class
StructureElementFactory |
static String |
getStructureElementIdentifier(Class<? extends StructureElement> c)
Returns the identifier of a given class
|
static String |
getTextualRepresentation(StructureElement element) |
StructureElement |
parseStructureElement(String structureElementDescription) |
protected StructureElement |
parseStructureElement(String structureElementType,
String structureElementBody)
Initializes and returns the structureElement described in
structureElementBody |
public static final String TYPE_CONTENT_SEPARATOR
public static StructureElementFactory getInstance()
StructureElementFactory
StructureElementFactory
protected StructureElement parseStructureElement(String structureElementType, String structureElementBody) throws InstantiationException
structureElementBody
structureElementType
- the identifier of the structureElement class to be
instantiatedstructureElementBody
- the the textual description of the structureElement to be
instantiatedstructureElementBody
InstantiationException
public StructureElement parseStructureElement(String structureElementDescription) throws InstantiationException
InstantiationException
public static String getStructureElementIdentifier(Class<? extends StructureElement> c)
c
- the class whose identifier is requestedpublic static String getTextualRepresentation(StructureElement element)
Copyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.