本文整理了Java中org.qi4j.api.common.QualifiedName.toNamespace
方法的一些代码示例,展示了QualifiedName.toNamespace
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QualifiedName.toNamespace
方法的具体详情如下:
包路径:org.qi4j.api.common.QualifiedName
类名称:QualifiedName
方法名:toNamespace
[英]Return the URI of the TypeName component of the QualifiedName.
The URI of the TypeName component is in the form of;
"urn:qi4j:type:" normalizedClassName
where normalizedClassName is the fully-qualified class name having had any dollar ($) characters replaced by URI friendly dashes (-), with a trailing hash (#). Examples;
urn:qi4j:type:org.qi4j.api.common.QualifiedName#
urn:qi4j:type:org.qi4j.samples.MyClass-MyInnerClass#
[中]返回QualifiedName的TypeName组件的URI。
TypeName组件的URI格式为;
"urn:qi4j:type:" normalizedClassName
其中normalizedClassName是完全限定的类名,它用URI友好的破折号(-)替换了任何美元($)字符,并带有一个尾随的散列(#)。例子;
urn:qi4j:type:org.qi4j.api.common.QualifiedName#
urn:qi4j:type:org.qi4j.samples.MyClass-MyInnerClass#
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
/**
* Returns the URI of the QualifiedName.
*
* <p>
* The URI is the {@link #toNamespace()} followed by the {@code name} component.
* <p>
*
* @return the URI of the QualifiedName.
*
* @see #toNamespace()
*/
public String toURI()
{
return toNamespace() + name;
}
代码示例来源:origin: org.qi4j.extension/org.qi4j.extension.indexing-rdf
public void addDefaultTriples( String resultType )
{
triples.add(
new Triple(
"?entityType",
"rdfs:subClassOf",
"<" + Classes.toURI( resultType ) + ">",
false )
);
triples.add(
new Triple(
"?entity",
"rdf:type",
"?entityType",
false )
);
triples.add(
new Triple(
"?entity",
addNamespace( QualifiedName.fromClass( Identity.class, "identity" ).toNamespace() ) + ":identity",
"?identity",
false
)
);
}
代码示例来源:origin: org.qi4j.extension/org.qi4j.extension.indexing-rdf
public Triple addTripleAssociation( AssociationFunction<?> associationReference, boolean optional )
{
String subject = "?entity";
if( associationReference.traversedAssociation() != null )
{
subject = addTripleAssociation( associationReference.traversedAssociation(), false ).value;
}
QualifiedName qualifiedName = QualifiedName.fromAccessor( associationReference.accessor() );
String prefix = addNamespace( qualifiedName.toNamespace() );
return addTriple( subject, prefix + ":" + qualifiedName.name(), optional );
}
代码示例来源:origin: org.qi4j.extension/org.qi4j.extension.indexing-rdf
public Triple addTripleManyAssociation( final ManyAssociationFunction<?> manyAssociationReference,
final boolean optional
)
{
AssociationFunction<?> traversedAssociation = manyAssociationReference.traversedAssociation();
String subject = "?entity";
if( traversedAssociation != null )
{
subject = addTripleAssociation( traversedAssociation, false ).value;
}
QualifiedName qualifiedName = QualifiedName.fromAccessor( manyAssociationReference.accessor() );
String predicatePrefix = addNamespace( qualifiedName.toNamespace() );
String predicate = predicatePrefix + ":" + qualifiedName.name();
Triple collectionTriple = addTriple( subject, predicate, optional );
String liSubject = collectionTriple.value;
return addTriple( liSubject, "rdf:li", false );
}
代码示例来源:origin: org.qi4j.extension/org.qi4j.extension.indexing-rdf
public Triple addTriple( final PropertyFunction<?> propertyFunction, boolean optional )
{
String subject = "?entity";
if( propertyFunction.traversedAssociation() != null )
{
subject = addTripleAssociation( propertyFunction.traversedAssociation(), false ).value;
}
else if( propertyFunction.traversedProperty() != null )
{
subject = addTriple( propertyFunction.traversedProperty(), false ).value;
}
QualifiedName qualifiedName = QualifiedName.fromAccessor( propertyFunction.accessor() );
String prefix = addNamespace( qualifiedName.toNamespace() );
return addTriple( subject, prefix + ":" + qualifiedName.name(), optional );
}
内容来源于网络,如有侵权,请联系作者删除!