Interface StructuredDataCapableAsset
-
- All Superinterfaces:
BaseAsset
- All Known Subinterfaces:
Page
,XHTMLDataDefinitionBlock
public interface StructuredDataCapableAsset extends BaseAsset
Identifies that an asset is capable of structured data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StructuredDataDefinition
getDataDefinition()
java.lang.String
getDataDefinitionId()
A shortcut forgetDataDefinition().getAssetId()
java.lang.String
getDataDefinitionPath()
StructuredDataNode[]
getStructuredData()
Get the asset's structured data information, possibly null if the asset does not use structured data.StructuredDataNode
getStructuredDataNode(java.lang.String path)
Returns first found StructuredDataNode identified by given path.StructuredDataNode[]
getStructuredDataNodes(java.lang.String path)
Return structured data nodes matching given path.java.util.List<StructuredDataNode>
getStructuredDataNodesWithFieldId(java.lang.String definitionFieldId)
StructuredDataNode
getStructuredDataNodeWithFieldId(java.lang.String definitionFieldId)
void
setName(java.lang.String newName)
Set the asset's name-
Methods inherited from interface com.hannonhill.cascade.api.asset.common.BaseAsset
getAssetId, getAssetType, getIdentifer
-
-
-
-
Method Detail
-
getStructuredData
StructuredDataNode[] getStructuredData()
Get the asset's structured data information, possibly null if the asset does not use structured data.- Returns:
- the StructuredData information, or null if the page does not use structured data
-
getStructuredDataNodesWithFieldId
java.util.List<StructuredDataNode> getStructuredDataNodesWithFieldId(java.lang.String definitionFieldId)
- Returns:
- the
StructuredDataNode
s that match givendefinitionFieldId
-
getStructuredDataNodeWithFieldId
StructuredDataNode getStructuredDataNodeWithFieldId(java.lang.String definitionFieldId)
- Returns:
- first found
StructuredDataNode
that matches givendefinitionFieldId
-
getStructuredDataNodes
StructuredDataNode[] getStructuredDataNodes(java.lang.String path)
Return structured data nodes matching given path. The path contains node's ancestor group identifiers separated by "/". For example "employee-information/address/city".- Parameters:
path
- the structured data path to follow- Returns:
- returns an array of top level StructuredDataNodes or an empty array if no matches are found
-
getStructuredDataNode
StructuredDataNode getStructuredDataNode(java.lang.String path)
Returns first found StructuredDataNode identified by given path. This provides the same functionality as getStructuredDataNodes(path), but instead of returning all matching elements in form of an array, it will return first found element itself.- Returns:
- Returns first for StructuredDataNode or null.
-
getDataDefinitionPath
java.lang.String getDataDefinitionPath()
- Returns:
- Returns the path of the data definition
-
setName
void setName(java.lang.String newName)
Set the asset's name- Parameters:
newName
- the new name
-
getDataDefinition
StructuredDataDefinition getDataDefinition()
- Returns:
- returns reference to the data definition
-
getDataDefinitionId
java.lang.String getDataDefinitionId()
A shortcut forgetDataDefinition().getAssetId()
-
-