public class DataModel
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
java.util.List<DataModelClass> |
dataModelClass |
java.util.List<DataModelEnum> |
dataModelEnum |
static boolean |
DEFAULT_EXPAND_NAMED_ENTITIES_LIKE_IN2014 |
static boolean |
DEFAULT_STORE_ALL_METAS |
static boolean |
DEFAULT_TRACE_ALL_METAS |
java.lang.String |
defaultClass |
boolean |
expandNamedEntitiesLikeIn2014 |
java.lang.String |
name |
java.lang.String |
possibleLanguages |
java.util.List<SemanticType> |
semanticType |
boolean |
storeAllMetas |
boolean |
traceAllMetas |
Constructor and Description |
---|
DataModel() |
DataModel(DataModel o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addClass(DataModelClass classDef) |
void |
addSignedProperty(java.lang.String className,
java.lang.String name)
Add a signed property to a class.
|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this DataModel.
|
static DataModel |
fromString(java.lang.String s)
String representation of this DataModel.
|
DataModelClass |
getClass(java.lang.String name)
Get an existing class, returns null if it does not exist
|
java.util.List<DataModelClass> |
getDataModelClass()
List of classes of this data model.
|
java.util.Map<java.lang.String,DataModelClass> |
getDataModelClassAsMap()
Get the map of DataModelClass, indexed by name
|
DataModelClass |
getDataModelClassByName(java.lang.String _lookup)
Get the DataModelClass for which the name matches _lookup
|
java.util.List<DataModelEnum> |
getDataModelEnum() |
java.util.Map<java.lang.String,DataModelEnum> |
getDataModelEnumAsMap()
Get the map of DataModelEnum, indexed by name
|
DataModelEnum |
getDataModelEnumByName(java.lang.String _lookup)
Get the DataModelEnum for which the name matches _lookup
|
java.lang.String |
getDefaultClass()
Default class to push documents when there is no "datamodel_class" papi directive, or no "TYPE" meta.
|
java.lang.String |
getName()
Name of this Data Model.
|
DataModelClass |
getOrCreateClass(java.lang.String name)
Get a class, create it if it does not already exist
|
java.lang.String |
getPossibleLanguages()
The list of languages that can appear in the corpus.
Language detection will be restricted to this set. A null value means that all languages are possible. |
java.util.List<SemanticType> |
getSemanticType()
The list of semantic types of this data model.
A semantic type defines the semantic analysis to perform, and can be assigned to 'alphanumeric' properties. The semantic types available out of the box are: text, identifier, meta, and url. |
java.util.Map<java.lang.String,SemanticType> |
getSemanticTypeAsMap()
Get the map of SemanticType, indexed by name
|
SemanticType |
getSemanticTypeByName(java.lang.String _lookup)
Get the SemanticType for which the name matches _lookup
|
boolean |
isExpandNamedEntitiesLikeIn2014() |
boolean |
isStoreAllMetas()
Saves all metas that were not mapped to an index field or category as "csv encoded metas".
These metas are retrievable only. |
boolean |
isTraceAllMetas()
Select this option before indexing, then click "Add Properties from Traced Metas" to simplify creating new properties.
The traced metas are stored in a separate database. |
DataModel |
makeCopy()
Creates and returns a deep copy of this DataModel.
|
static DataModel |
readFrom(java.io.InputStream is)
Read this DataModel from an XML fragment.
|
boolean |
removeDataModelClassByName(java.lang.String _lookup)
Removes the DataModelClass for which the name matches _lookup
|
boolean |
removeDataModelEnumByName(java.lang.String _lookup)
Removes the DataModelEnum for which the name matches _lookup
|
boolean |
removeSemanticTypeByName(java.lang.String _lookup)
Removes the SemanticType for which the name matches _lookup
|
void |
setDefaultClass(java.lang.String defaultClass)
Default class to push documents when there is no "datamodel_class" papi directive, or no "TYPE" meta.
|
void |
setExpandNamedEntitiesLikeIn2014(boolean expandNamedEntitiesLikeIn2014) |
void |
setName(java.lang.String name)
Name of this Data Model.
|
void |
setPossibleLanguages(java.lang.String possibleLanguages)
The list of languages that can appear in the corpus.
Language detection will be restricted to this set. A null value means that all languages are possible. |
void |
setStoreAllMetas(boolean storeAllMetas)
Saves all metas that were not mapped to an index field or category as "csv encoded metas".
These metas are retrievable only. |
void |
setTraceAllMetas(boolean traceAllMetas)
Select this option before indexing, then click "Add Properties from Traced Metas" to simplify creating new properties.
The traced metas are stored in a separate database. |
java.lang.String |
toString()
String representation of this DataModel.
|
DataModel |
withDataModelClass(java.util.Collection<DataModelClass> __values) |
DataModel |
withDataModelClass(DataModelClass... __values)
List of classes of this data model.
|
DataModel |
withDataModelEnum(java.util.Collection<DataModelEnum> __values) |
DataModel |
withDataModelEnum(DataModelEnum... __values) |
DataModel |
withDefaultClass(java.lang.String defaultClass) |
DataModel |
withExpandNamedEntitiesLikeIn2014(boolean expandNamedEntitiesLikeIn2014) |
DataModel |
withExpandNamedEntitiesLikeIn2014(java.lang.Boolean expandNamedEntitiesLikeIn2014) |
DataModel |
withName(java.lang.String name) |
DataModel |
withPossibleLanguages(java.lang.String possibleLanguages) |
DataModel |
withSemanticType(java.util.Collection<SemanticType> __values) |
DataModel |
withSemanticType(SemanticType... __values)
The list of semantic types of this data model.
A semantic type defines the semantic analysis to perform, and can be assigned to 'alphanumeric' properties. The semantic types available out of the box are: text, identifier, meta, and url. |
DataModel |
withStoreAllMetas(boolean storeAllMetas) |
DataModel |
withStoreAllMetas(java.lang.Boolean storeAllMetas) |
DataModel |
withTraceAllMetas(boolean traceAllMetas) |
DataModel |
withTraceAllMetas(java.lang.Boolean traceAllMetas) |
void |
writeTo(java.io.OutputStream os)
Write this DataModel as an XML fragment
|
public java.lang.String name
public java.lang.String defaultClass
public java.util.List<DataModelEnum> dataModelEnum
public java.util.List<DataModelClass> dataModelClass
public java.util.List<SemanticType> semanticType
public java.lang.String possibleLanguages
public boolean storeAllMetas
public static final boolean DEFAULT_STORE_ALL_METAS
public boolean traceAllMetas
public static final boolean DEFAULT_TRACE_ALL_METAS
public boolean expandNamedEntitiesLikeIn2014
public static final boolean DEFAULT_EXPAND_NAMED_ENTITIES_LIKE_IN2014
public DataModel()
public DataModel(DataModel o)
public void setName(java.lang.String name)
public java.lang.String getName()
public DataModel withName(java.lang.String name)
public void setDefaultClass(java.lang.String defaultClass)
public java.lang.String getDefaultClass()
public DataModel withDefaultClass(java.lang.String defaultClass)
public java.util.List<DataModelEnum> getDataModelEnum()
public DataModelEnum getDataModelEnumByName(java.lang.String _lookup)
public java.util.Map<java.lang.String,DataModelEnum> getDataModelEnumAsMap()
public boolean removeDataModelEnumByName(java.lang.String _lookup)
public DataModel withDataModelEnum(DataModelEnum... __values)
public DataModel withDataModelEnum(java.util.Collection<DataModelEnum> __values)
public java.util.List<DataModelClass> getDataModelClass()
public DataModelClass getDataModelClassByName(java.lang.String _lookup)
public java.util.Map<java.lang.String,DataModelClass> getDataModelClassAsMap()
public boolean removeDataModelClassByName(java.lang.String _lookup)
public DataModel withDataModelClass(DataModelClass... __values)
public DataModel withDataModelClass(java.util.Collection<DataModelClass> __values)
public java.util.List<SemanticType> getSemanticType()
public SemanticType getSemanticTypeByName(java.lang.String _lookup)
public java.util.Map<java.lang.String,SemanticType> getSemanticTypeAsMap()
public boolean removeSemanticTypeByName(java.lang.String _lookup)
public DataModel withSemanticType(SemanticType... __values)
public DataModel withSemanticType(java.util.Collection<SemanticType> __values)
public void setPossibleLanguages(java.lang.String possibleLanguages)
public java.lang.String getPossibleLanguages()
public DataModel withPossibleLanguages(java.lang.String possibleLanguages)
public void setStoreAllMetas(boolean storeAllMetas)
public boolean isStoreAllMetas()
public DataModel withStoreAllMetas(boolean storeAllMetas)
public DataModel withStoreAllMetas(java.lang.Boolean storeAllMetas)
public void setTraceAllMetas(boolean traceAllMetas)
public boolean isTraceAllMetas()
public DataModel withTraceAllMetas(boolean traceAllMetas)
public DataModel withTraceAllMetas(java.lang.Boolean traceAllMetas)
public void setExpandNamedEntitiesLikeIn2014(boolean expandNamedEntitiesLikeIn2014)
public boolean isExpandNamedEntitiesLikeIn2014()
public DataModel withExpandNamedEntitiesLikeIn2014(boolean expandNamedEntitiesLikeIn2014)
public DataModel withExpandNamedEntitiesLikeIn2014(java.lang.Boolean expandNamedEntitiesLikeIn2014)
public DataModel makeCopy()
public static DataModel readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
javax.xml.bind.JAXBException
java.io.IOException
public static DataModel fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class java.lang.Object
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
com.exalead.util.TypedException
public DataModelClass getClass(java.lang.String name)
public DataModelClass getOrCreateClass(java.lang.String name)
public void addSignedProperty(java.lang.String className, java.lang.String name)
public void addClass(DataModelClass classDef)
Copyright © 2021 Dassault Systèmes, All Rights Reserved.